package com.asman.vr.dto

import androidx.annotation.MainThread
import com.asman.vr.network.Api
import com.asman.vr.network.RequestBody
import com.asman.vr.network.liveData
import java.util.concurrent.Executor

class ContractRepository(private val api: Api, private val networkExecutor: Executor) {

    @MainThread
    fun getContractUrl(contractId: Long) = liveData(api.getContractUrl(contractId))

    @MainThread
    fun updateContractInfo(body: ContractDetailInfoData) = liveData(api.updateContractInfo(body))

    @MainThread
    fun getContractDetailInfo(projectId: Long) = liveData(api.getContractDetailInfo(projectId))

    @MainThread
    fun getContractStatus(projectId: Long) = liveData(api.getContractStatus(projectId))

    @MainThread
    fun uploadContractIDCardInfo(body: RequestBody.UploadContractIDCard) =
        liveData(api.uploadContractIDCardInfo(body))

    @MainThread
    fun getContractFiles(projectId: Long) = liveData(api.getContractFiles(projectId))

}